#ifndef _BASIC_OBJECT_H_
#define _BASIC_OBJECT_H_

/**
 * @file include/baselib/BasicObject.h
 * There is interface of abstract class BasicObject.
 * All classes will be inherited from this class.
 *
 * @author Sharifullin Marat
*/

/**
 * class BasicObject
 *
*/
class BasicObject {
  /**
   * default constructor
   */
  BasicObject() {}

  /**
   * virtual destructor
   */
  virtual ~BasicObject() {}

  /**
   * method to clone object
   * @return copy of this object
   */
  virtual BasicObject & clone( ) const = 0;

  /**
   * method to get class name in string
   * @return class name in const char*
   */
  virtual const char * className() const = 0;

  /**
   * check object for null
   * @return true if object is not NULL, false in other cases
   */
  virtual bool isNull() const = 0;

  /**
   * check object for not NULL
   * @return true if object is NULL, false in other cases
   */
  virtual bool isNotNull() const { return !this->isNull(); }

  /**
   * set object in null
   */
  virtual void setNull() = 0;

  /**
   * get size of object
   * @return size of current object
   */
  virtual unsinged int size() const = 0;
  
  /**
   * get size of object
   * @return size of current object
   */
  virtual unsinged int getSize() const { return this->size(); }

  /**
   * get type of object
   * @return type of current object
   */
  virtual ObjectType type() const = 0;

  /**
   * get type of object
   * @return type of current object
   */
  virtual ObjectType getType() const { return this->type(); }

  /**
   * get string representation of object
   * @return string representation of current object
   */
  virtual const char * toString() const = 0;

  /**
   * get pointer to this object
   * @return void pointer to current object
   */
  virtual void * voidPtr() const = 0;

  /**
   * compare current object with another
   * @param[in] obj object to compare with current object
   * @return true if objects are equal, false in other cases
   */
  virtual bool operator==( const BasicObject & obj ) const = 0;

};


#endif //_BASIC_OBJECT_H_

